package cn.wjx.taobaounion.utils;

/**
 * @author WuChangJian
 * @date 2020/6/19 15:43
 */
public class URLUtils {

    public static String getCoverPath(String pictUrl, int size) {
        String path = getTicketPath(pictUrl);
        return path + "_" + size + "x" + size + ".jpg";
    }

    public static String getTicketPath(String url) {
        if (url.startsWith("http") || url.startsWith("https")) {
            return url;
        } else {
            return "https:" + url;
        }
    }
}
